.com
Hosted by:
Unit testing expertise at your fingertips!
Home | Discuss | Lists

Data Transfer Object

The book has now been published and the content of this chapter has likely changed substanstially.

Also known as: Transfer Object


Make the objects returned by a method immutable by copying their contents into special objects that only contain values and have no behavior.

Use a Transfer Object to encapsulate the business data. A single method call is used to send and retrieve the Transfer Object. When the client requests the enterprise bean for the business data, the enterprise bean can construct the Transfer Object, populate it with its attribute values, and pass it by value to the client.

Further Reading

From [CJ2EEP]: http://java.sun.com/blueprints/corej2eepatterns/Patterns/TransferObject.html



Page generated at Wed Feb 09 16:39:04 +1100 2011

Copyright © 2003-2008 Gerard Meszaros all rights reserved

All Categories
Introductory Narratives
Web Site Instructions
Code Refactorings
Database Patterns
DfT Patterns
External Patterns
Fixture Setup Patterns
Fixture Teardown Patterns
Front Matter
Glossary
Misc
References
Result Verification Patterns
Sidebars
Terminology
Test Double Patterns
Test Organization
Test Refactorings
Test Smells
Test Strategy
Tools
Value Patterns
XUnit Basics
xUnit Members
All "External Patterns"
Abstract Factory
Adapter
Command
Comparator
Complete Constructor Method
Composite
Data Access Object
Data Transfer Object
--Transfer Object
Decorator
Domain Model
Facade
Factory Method
Foreign Method
Guard Clause
Hexagonal Architecture
Integration Build
Intent Revealing Name
Interpreter
Layered Architecture
Lazy Initialization
Marker Interface
Noun Phrase Name
Null Object
Observer
Pluggable Behavior
Private Workspace
Prototype
Registry
Remote Facade
Remote Proxy
Repository
Self-Call
Service Facade
Service Layer
Session Facade
Singleton
Skippable Sections
Smoke Test
State
Strategy
Template Method
Thread-Specific Storage
Transaction Script
Ubiquitous Language
Virtual Clock